from flask import g, render_template, current_app
from flask.views import MethodView

class ColumnMeta(type):

    def __new__(cls, name, parents, attributes):
        if name == "Column":
            return type.__new__(cls, name, parents, attributes)
        if name not in attributes:
            attributes["name"] = name
            attributes["display_name"] = name.capitalize()
        return type.__new__(cls, name, parents, attributes)


class Column(object):
    __metaclass__ = ColumnMeta

    name = None
    display_name = None
    type_ = None
    fixed = None

    @staticmethod
    def get_class(name):
        return type(name, (Column, ), {})